package com.cloudkinto.service.order.returns;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.dto.order.returns.OrderReturnPageDto;
import com.cloudkinto.entity.OrderReturnDo;
import com.cloudkinto.vo.order.returns.*;
import com.cloudkinto.vo.order.returns.importVo.OrderReturnImportRes;
import com.cloudkinto.vo.order.returns.pack.OrPackDetailRes;
import com.cloudkinto.vo.order.returns.print.PrintReq;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * service接口
 * </p>
 *
 * @author hua
 * @since 2024-11-19
 */
public interface OrderReturnService extends IService<OrderReturnDo> {

    SingleResult addInit();

    Long add(OrderReturnAddReq req, Long userId, Long companyId);

    OrderReturnDo addReturn(OrderReturnAddReq req, Long userId, Long companyId);

    SingleResult updateInit(Long id);

    Object update(OrderReturnUpdateReq updateVo, Long userId, Long loginId, String source);

    int delete(Long id, Long userId);

    OrDetailRes detail(Long id, Long loginId, String source);

    List<OrPackDetailRes> getPackDetail(Long id, String sizeUnit, String wmsUnit);

    SingleResult pageInit(Long userId, Long companyId, Long tenantId, String source);

    List<OrderReturnPageDto> getList(Map<String, Object> map);

    PageResult getListPage(Map<String, Object> map);

    List<Map<String, Object>> statusStatistics(Map<String, Object> map);

    void submit(OrUtilReq req, Long userId, Long companyId);

    void cancel(OrUtilReq req, Long userId, Long companyId);

    OrDetailRes packageList(Long id);

    void updatePackage(OrderReturnPUpdateReq req, Long userId);

    void updateExpectedDate(UpdateExpectedDateReq req, Long userId);

    void confirmInventory(OrWmsScanReq req, Long userId, Long tenantId);

    List<PutawayInitRes> putawayInit(List<Long> ids, Long warehouseId, Long tenantId);

    List<PutAwayRes> confirmPutaway(List<PutawayInitRes> reqList, Long userId, Long warehouseId, Long tenantId);

    void finishInventory(Long id, Long userId, Long warehouseId, Long tenantId);


    OrderReturnImportRes importOrderReturn(MultipartFile file, Long userId, Long warehouseId, Long companyId);

    void printBarCodePdf(PrintReq req, HttpServletResponse response);

    void exportOrderReturn(Map<String, Object> map, HttpServletResponse response);


}
